using System;
using Microsoft.SharePoint;

namespace CKS.EBE.WebControls
{
    public class SingleListQuery : BaseQueryControl
    {
        private string _ListName;

        /// <summary>
        /// RootFolder Name of the list (the internal list name)
        /// </summary>
        public virtual string ListName
        {
            get { return _ListName; }
            set { _ListName = value; }
        }

        protected override void OnInit(EventArgs e)
        {
            RowLimit = 5000;

            SPList oList = Helper.GetListByFolderName(Web, ListName);
            ListsXML = string.Format("<Lists><List ID='{0}'/></Lists>", oList.ID);

            base.OnInit(e);
        }
    }
}
